<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      v-show="showSearch"
      :inline="true"
    >
      <el-form-item label="培训分类" prop="category">
        <el-select
          v-model="queryParams.category"
          placeholder="培训分类"
          clearable
          size="small"
          style="width: 240px"
          @change="handleQuery"
        >
          <el-option
            v-for="item in trainCateOptions"
            :key="item.id"
            :label="item.label"
            :value="item.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="培训方式" prop="trainModeId">
        <el-select
          v-model="queryParams.trainModeId"
          placeholder="培训方式"
          clearable
          size="small"
          style="width: 240px"
          @change="handleQuery"
        >
          <el-option
            v-for="item in trainModeOptions"
            :key="item.id"
            :label="item.label"
            :value="item.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="考核方式" prop="examMode">
        <el-select
          v-model="queryParams.examMode"
          placeholder="考核方式"
          clearable
          size="small"
          style="width: 240px"
          @change="handleQuery"
        >
          <el-option
            v-for="item in examModeOptions"
            :key="item.id"
            :label="item.label"
            :value="item.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="培训时间">
        <el-date-picker
          v-model="dateRange"
          size="small"
          style="width: 240px"
          value-format="yyyy-MM-dd"
          type="daterange"
          range-separator="-"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          @change="selectTime"
        ></el-date-picker>
      </el-form-item>
      <el-form-item label="关键字" prop="keywords">
        <el-input
          v-model="queryParams.keywords"
          placeholder="请输入培训标题"
          clearable
          size="small"
          style="width: 240px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          v-hasPermi="['31210']"
          @click="handleAdd"
          >添加计划</el-button
        >
      </el-col>
    </el-row>

    <el-table v-loading="loading" :data="tableList" :border="true">
      <!-- <el-table-column
        align="center"
        prop="thePic"
        label="培训封面"
        width="80"
      >
        <template slot-scope="scope">
          <imagePreview :src="scope.row.thePic" />
        </template>
      </el-table-column> -->
      <el-table-column label="培训计划" prop="title" align="center" width="120">
        <template slot-scope="scope">
          <span @click="handleSee(scope.row)" class="active">{{
            scope.row.title
          }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="培训分类"
        align="center"
        prop="category"
        width="100"
      />
      <!-- 培训时间（日期-日期 -->
      <el-table-column
        label="培训时间"
        align="center"
        prop="startTime"
        width="200"
      >
        <template slot-scope="scope">
          <span>{{ scope.row.startTime }} — {{ scope.row.endTime }}</span>
        </template>
      </el-table-column>
      <el-table-column
        label="主讲人"
        align="center"
        prop="speaker"
        width="100"
      />
      <el-table-column
        label="培训地点"
        align="center"
        prop="place"
        width="100"
      />
      <el-table-column
        label="教育目的"
        align="center"
        prop="educationalPurpose"
        width="160"
        :show-overflow-tooltip="true"
      />
      <el-table-column
        label="培训对象"
        align="center"
        prop="trainObject"
        width="160"
      />
      <el-table-column label="培训人数" prop="personnelNum" align="center" />
      <el-table-column label="培训课时" align="center" prop="classHours" />
      <el-table-column label="学分" align="center" prop="credit" />
      <el-table-column
        label="培训方式"
        align="center"
        prop="trainMode"
        width="100"
      />
      <el-table-column
        label="考试方式"
        align="center"
        prop="examMode"
        width="100"
      />
      <!-- 关联课程（弹框） -->
      <el-table-column
        label="关联课程"
        prop="courses"
        align="center"
        width="100"
      >
        <template slot-scope="scope">
          <span @click="clickSee(scope.row)" class="active">{{
            scope.row.courses
          }}</span>
        </template>
      </el-table-column>
      <!-- 完成进度（未开始、进行中、已完成） -->
      <el-table-column label="完成进度" prop="complete" align="center">
        <template slot-scope="scope">
          <span v-if="scope.row.complete === 0">待完成</span>
          <span v-if="scope.row.complete === 1">已完成</span>
        </template>
      </el-table-column>
      <el-table-column
        label="添加时间"
        align="center"
        prop="releaseTime"
        width="120"
      >
        <template slot-scope="scope">
          <span>{{ scope.row.releaseTime }}</span>
        </template>
      </el-table-column>
      <!-- <el-table-column label="发布人" align="center" prop="publisher" /> -->
      <el-table-column
        label="操作"
        align="center"
        class-name="small-padding fixed-width"
        fixed="right"
        width="100"
      >
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            v-hasPermi="['31220']"
            @click="handleUpdate(scope.row)"
            >修改</el-button
          >
          <el-button
            size="mini"
            type="text"
            v-hasPermi="['31230']"
            @click="handleDelete(scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.currentPage"
      :limit.sync="queryParams.pagesize"
      @pagination="getList"
    />

    <!-- 添加或修改参数配置对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="640px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <!-- 【培训信息】：*培训计划、*培训分类（下拉框）、*培训时间（日期-日期）、*主讲人（下拉框）、培训地点、教育目的、培训对象、*培训课时、*学分、*培训方式（下拉框） -->
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训计划" prop="title">
              <el-input v-model="form.title" placeholder="请输入培训计划" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训分类" prop="categoryId">
              <el-select
                v-model="form.categoryId"
                @change="changeCate"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in trainCateOptions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训时间" prop="startTime">
              <el-date-picker
                v-model="dateRange2"
                size="small"
                style="width: 240px"
                value-format="yyyy-MM-dd"
                type="daterange"
                range-separator="-"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                @change="changeDate"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="主讲人" prop="speakerId">
              <el-select
                v-model="form.speakerId"
                @change="changeSpeaker1"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in speakerOptions"
                  :key="item.theid"
                  :label="item.thename"
                  :value="item.theid"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训地点" prop="placeId">
              <el-select
                v-model="form.placeId"
                @change="changeSpeaker"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in trainPlaceOptions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="教育目的" prop="educationalPurpose">
              <el-input
                v-model="form.educationalPurpose"
                placeholder="请输入教育目的"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训对象" prop="trainObject">
              <el-input
                v-model="form.trainObject"
                placeholder="请输入培训对象"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训课时" prop="classHours">
              <el-input
                v-model="form.classHours"
                placeholder="请输入培训课时"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="学分" prop="credit">
              <el-input v-model="form.credit" placeholder="请输入学分" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训方式" prop="trainModeId">
              <el-select
                v-model="form.trainModeId"
                @change="changeTrainMode"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in trainModeOptions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="考试方式" prop="examModeId">
              <el-select
                v-model="form.examModeId"
                @change="changexamModeId"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in postOptions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="关联课程" prop="coursesId">
              <el-select
                v-model="form.coursesId"
                @change="changeCourselect"
                placeholder="请选择"
              >
                <el-option
                  v-for="item in Courselect"
                  :key="item.theid"
                  :label="item.title"
                  :value="item.theid"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训人数" prop="personnelNum">
              <el-input
                v-model="form.personnelNum"
                placeholder="请输入培训人数"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训内容" prop="trainContent">
              <el-input
                v-model="form.trainContent"
                type="textarea"
                :rows="1"
                placeholder="请输入培训内容"
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

    <el-dialog
      title="查看培训信息"
      :visible.sync="open2"
      width="640px"
      append-to-body
    >
      <el-form ref="form" :model="form" label-width="80px">
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训时间" prop="startTime">
              <el-date-picker
                v-model="dateRange2"
                size="small"
                style="width: 240px"
                value-format="yyyy-MM-dd"
                type="daterange"
                range-separator="-"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                disabled
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训内容" prop="trainContent">
              <el-input
                v-model="form.trainContent"
                disabled
                placeholder="请输入培训内容"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="主讲人" prop="speakerId">
              <el-select v-model="form.speakerId" placeholder="请选择" disabled>
                <el-option
                  v-for="item in speakerOptions"
                  :key="item.theid"
                  :label="item.thename"
                  :value="item.theid"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训方式" prop="trainMode">
              <el-select v-model="form.trainMode" placeholder="请选择" disabled>
                <el-option
                  v-for="item in trainModeOptions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训地点" prop="place">
              <el-input
                v-model="form.place"
                disabled
                placeholder="请输入培训地点"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="教育目的" prop="educationalPurpose">
              <el-input
                v-model="form.educationalPurpose"
                disabled
                placeholder="请输入教育目的"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="培训对象" prop="trainObject">
              <el-input
                v-model="form.trainObject"
                disabled
                placeholder="请输入培训对象"
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="培训课时" prop="classHours">
              <el-input
                v-model="form.classHours"
                disabled
                placeholder="请输入培训课时"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="考试形式" prop="examMode">
              <el-select v-model="form.examMode" placeholder="请选择" disabled>
                <el-option
                  v-for="item in examModeOptions"
                  :key="item.id"
                  :label="item.label"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </el-dialog>

    <el-dialog
      title="课程明细"
      :visible.sync="open3"
      width="800px"
      append-to-body
    >
      <el-table
        v-loading="loading2"
        :data="CourseDetails"
        :border="true"
        max-height="600px"
      >
        <el-table-column
          align="center"
          prop="thePic"
          label="课程图片"
          width="80"
        >
          <template slot-scope="scope">
            <imagePreview :src="scope.row.thePic" />
          </template>
        </el-table-column>
        <el-table-column
          label="课程名称"
          prop="title"
          align="center"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="主讲人"
          prop="speaker"
          align="center"
          :show-overflow-tooltip="true"
        />

        <el-table-column
          label="培训课时"
          prop="classHours"
          align="center"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="学分"
          prop="credit"
          align="center"
          :show-overflow-tooltip="true"
        />
      </el-table>

      <pagination
        v-show="total2 > 0"
        :total="total2"
        :page.sync="queryParams2.currentPage"
        :limit.sync="queryParams2.pagesize"
        @pagination="getListCourse"
      />
    </el-dialog>
  </div>
</template>

<script>
import {
  getPage,
  listData,
  getData,
  delData,
  addData,
  updateData,
  delMultiData,
  getSelect,
  getEnable,
  teacherList,
  getCourse,
  getCourselect,
} from "@/api/trainAdmin/trainPlan";
import { getInstitutions, getDepartment, getDict } from "@/api/select";
export default {
  name: "trainPlan",
  data() {
    return {
      trainCateOptions: [], //培训分类
      trainModeOptions: [], //培训方式
      examModeOptions: [],
      speakerOptions: [], //主讲人
      trainPlaceOptions: [], // 培训地点
      CourseDetails: [], //  关联课程
      postOptions: [], // 考试方式
      Courselect: [], //  关联课程 下拉
      queryParams: {
        currentPage: 1,
        pagesize: 10,
        keywords: undefined,
        category: undefined,
        trainMode: undefined,
        examMode: undefined,
        startTime: undefined,
        endTime: undefined,
        trainModeId: undefined,
      },
      dateRange: [],
      showSearch: true,
      ids: [],
      single: true,
      multiple: true,
      loading: true,
      total: 0,
      tableList: [],
      title: "",
      open: false,
      form: {},
      rules: {
        title: [
          { required: true, message: "培训计划不能为空", trigger: "blur" },
        ],
        categoryId: [
          { required: true, message: "请选择培训分类", trigger: "change" },
        ],
        startTime: [
          { required: true, message: "请选择培训时间", trigger: "change" },
        ],
        speakerId: [
          { required: true, message: "主讲人不能为空", trigger: "blur" },
        ],
        classHours: [
          { required: true, message: "培训课时不能为空", trigger: "blur" },
        ],
        credit: [{ required: true, message: "学分不能为空", trigger: "blur" }],
        trainMode: [
          { required: true, message: "请选择培训方式", trigger: "change" },
        ],
      },
      open2: false,
      dateRange2: [],
      open3: false,
      queryParams2: {
        currentPage: 1,
        pagesize: 10,
        courseId: undefined,
      },
      total2: 0,
      loading2: false,
      tableList2: [],

      tabs: ["视频", "文章"],
      curTabs: "视频",
    };
  },
  created() {
    this.getList();
    this.getSelect();
    this.getTeacher();
    this.getCourselect();
    getDict(29, 0).then((response) => {
      //29-考试方式
      this.postOptions = response.result.data;
    });
  },
  methods: {
    // 培训时间
    selectTime(val) {
      console.log(!val);
      if (val) {
        this.handleQuery();
      } else {
        this.queryParams.startTime = undefined;
        this.queryParams.endTime = undefined;
        this.handleQuery();
      }
    },
    // 关联课程 下拉
    getCourselect() {
      getCourselect(this.queryParams).then((response) => {
        // console.log(response);
        this.Courselect = response.result.rows;
      });
    },
    getList() {
      this.loading = true;
      if (this.dateRange != null) {
        this.queryParams.startTime = this.dateRange[0];
        this.queryParams.endTime = this.dateRange[1];
      }
      listData(this.queryParams).then((response) => {
        this.tableList = response.result.rows;
        // console.log(this.tableList);
        this.total = response.result.total;
        this.loading = false;
      });
    },
    getSelect() {
      getSelect().then((response) => {
        this.trainCateOptions = response.result.trainCategory; //培训分类
        this.trainModeOptions = response.result.trainMode; //培训方式
        console.log("培训方式", this.trainModeOptions);
        this.examModeOptions = response.result.examMode; //考试方式
        this.trainPlaceOptions = response.result.trainPlace;
      });
    },
    handleQuery() {
      this.queryParams.currentPage = 1;
      this.getList();
    },
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
    handleSee(row) {
      this.reset();
      const theId = row.theid;
      getData(theId).then((response) => {
        // console.log(response.result);
        this.form = response.result;

        this.$set(this.dateRange2, 0, response.result.startTime);
        this.$set(this.dateRange2, 1, response.result.endTime);
        this.open2 = true;
      });
    },
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加";
    },
    handleUpdate(row) {
      this.reset();
      const theId = row.theid;
      getData(theId).then((response) => {
        // console.log(response.result);
        this.form = response.result;
        this.open = true;
        this.$set(this.dateRange2, 0, response.result.startTime);
        this.$set(this.dateRange2, 1, response.result.endTime);
        // this.dateRange2[0] = response.result.startTime;
        // this.dateRange2[1] = response.result.endTime;
        // console.log("this.dateRange2", this.dateRange2);
        this.title = "修改";
      });
    },
    submitForm() {
      if (this.dateRange2 != null) {
        this.form.startTime = this.dateRange2[0];

        this.form.endTime = this.dateRange2[1];
      }
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.theid != undefined) {
            updateData(this.form).then((response) => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addData(this.form).then((response) => {
              this.msgSuccess("添加成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    cancel() {
      this.open = false;
      this.reset();
    },
    reset() {
      this.form = {
        titleName: undefined,
        title: undefined, //培训名称
        startTime: undefined, //培训开始时间
        endTime: undefined, //培训结束时间
        categoryId: undefined, //培训分类 id
        category: undefined, //培训分类
        speakerId: undefined, //主讲人 id
        speaker: undefined, //主讲人
        placeId: undefined, //培训地点 id
        place: undefined, //培训地点
        educationalPurpose: undefined, //教育目的
        trainObject: undefined, //培训对象
        classHours: undefined, //培训课时
        credit: undefined, //培训学分
        trainModeId: undefined, //培训方式 id
        trainMode: undefined, //培训方式
        examModeId: undefined, //考试方式 id
        examMode: undefined, //考试方式
        coursesId: undefined, //关联课程id
        courses: undefined, //关联课程
        personnelNum: undefined, // 培训人数
        trainContent: undefined, // 培训内容
      };
      this.dateRange2 = [];
      this.resetForm("form");
    },
    handleDelete(row) {
      const theId = row.theid || this.ids;
      this.$confirm("是否确认删除?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          // 调接口
          return delData(theId);
        })
        .then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        });
    },
    handleStatusChange(row) {
      let text = row.enable === 0 ? "启用" : "停用";
      this.$confirm('是否确认' + text + '"?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(function () {
          // 调接口 改变状态值
          return getEnable(row.theid, row.enable);
        })
        .then(() => {
          this.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.enable = row.enable === 0 ? 1 : 0;
        });
    },
    //   关联课程
    clickSee(row) {
      this.open3 = true;
      // this.queryParams2.courseId = row.theid
      const theId = row.coursesId;
      this.CourseDetails = [];
      getCourse(theId).then((response) => {
        // this.CourseDetails[0] = response.result;
        this.CourseDetails.push(response.result);
        // console.log("this.CourseDetails", this.CourseDetails);
      });
    },
    getListCourse() {
      // this.tableList2 = this.tableList;
      /* this.loading2 = true;
      listData(this.queryParams2).then( response => {
        this.tableList2 = response.result.rows;
        this.total2 = response.result.total;
        this.loading2 = false;
      }); */
    },
    getTeacher() {
      teacherList(this.queryParams).then((response) => {
        this.speakerOptions = response.result.rows;
      });
    },
    handleClick(tab) {
      this.curTabs = tab;
    },
    changeCate(val) {
      // console.log(val);
      //培训分类
      if (this.trainCateOptions.length > 0) {
        this.form.category = val
          ? this.trainCateOptions.find((ele) => ele.id === val).label
          : "";
      }
    },
    changeSpeaker(val) {
      //培训地点
      if (this.trainPlaceOptions.length > 0) {
        this.form.place = val
          ? this.trainPlaceOptions.find((ele) => ele.id === val).label
          : "";
      }
    },
    changeSpeaker1(val) {
      //主讲人
      if (this.speakerOptions.length > 0) {
        this.form.speaker = val
          ? this.speakerOptions.find((ele) => ele.theid === val).thename
          : "";
      }
    },
    changeTrainMode(val) {
      //培训方式
      if (this.trainModeOptions.length > 0) {
        this.form.trainMode = val
          ? this.trainModeOptions.find((ele) => ele.id === val).label
          : "";
      }
    },
    // 关联课程
    changeCourselect(val) {
      if (this.Courselect.length > 0) {
        this.form.courses = val
          ? this.Courselect.find((ele) => ele.theid === val).title
          : "";
      }
    },
    // 考试方式
    changexamModeId(val) {
      // console.log(val);
      if (this.postOptions.length > 0) {
        this.form.examMode = val
          ? this.postOptions.find((ele) => ele.id === val).label
          : "";
      }
    },
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.dictCode);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    changeDate(val) {
      if (val != null) {
        this.$set(this.form, "startTime", val[0]);
        this.$set(this.form, "endTime", val[1]);
      }
    },
  },
};
</script>

<style lang="scss" scoped>
.el-table .active {
  color: #409eff;
  cursor: pointer;
  text-decoration: underline;
}
.tabs {
  width: 100%;
  height: 40px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  li {
    padding: 4px 10px;
    color: #409eff;
    margin-right: 20px;
    cursor: pointer;
  }
  li.active {
    background: #409eff;
    color: #fff;
  }
}
/* .el-date-editor*/
/deep/ .el-dialog__body .el-date-editor.el-input,
/deep/ .el-dialog__body .el-date-editor.el-input__inner {
  // width: 220px;
  width: auto !important;
}
/deep/ .el-range-editor.is-disabled input {
  color: #a3adba;
}
</style>